import 'package:flutter/cupertino.dart';

import '../repository/bt_login_repository.dart';

class BtLoginModel extends ChangeNotifier {
  bool _isAgreed = false;

  bool get isAgreed => _isAgreed;

  late final BtLoginRepository repository;

  BtLoginModel() {
    repository = BtLoginRepository();
  }

  void setAgreed(bool isAgreed) {
    _isAgreed = isAgreed;
    notifyListeners();
  }

  void login(int oauthType, String token, Function(bool success, String msg) onResult) {
    repository.login(oauthType, token, onResult);
  }
}
